package package6;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

public class ByteArrayTest {
	public static void main(String[] args) throws IOException {
		ByteArrayTest nisb= new ByteArrayTest();
		nisb.readStream("wo cao ni de ");
	}

	public void readStream(String sb) throws IOException {
		byte[] bytes= sb.getBytes();
		InputStream ba =System.in; 
		ByteArrayOutputStream bao = new ByteArrayOutputStream(); 
		int a = -1;
		while((a=ba.read())!=-1){
			bao.write(a);
		}
		System.out.println(bao);
	}
}